<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="author" content="Ming Ou" />
    <meta name="keywords" content="HTML, CSS, JavaScript" />
    <meta name="description" content="Ming Ou s Test Note" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no, shrink-to-fit=no"
      viewport-fit="cover"
    />
    <title>ffmepg_rtsp</title>
    <link rel="stylesheet" type="text/css" href="" />
    <style></style>
  </head>
  <script src="flv.min.js"></script>
  <body>
    <video id="video" height="300" width="500" controls></video>
    <button onclick="videoplay()">2333</button>
  </body>
  <script>
    let player;
    if (flvjs.isSupported()) {
      console.log(`flvjs.isSupported`);
      let oVideo = document.getElementById('video');
      player = flvjs.createPlayer({
        type: 'flv',
        url: 'http://localhost:85/live/test.flv',
        //url: 'ws://localhost:85/live/technology.flv',
      });
      player.attachMediaElement(oVideo);
      player.load();
    }

    function videoplay() {
      player.play();
    }
  </script>
</html>
